<template>
  <div class="audit-config-item">
    <a-space>
      <slot name="title" :record="value">
        {{ value.title }}
      </slot>
      <span>({{ value.desc }})</span>
    </a-space>
    <a-button type="text" @click="handelOpenFlow">配置审批人</a-button>
  </div>
</template>

<script setup>
const props = defineProps({
  value: {
    type: Object,
    required: true
  }
});

const emit = defineEmits(["openFlow"]);
const handelOpenFlow = () => {
  emit("openFlow", props.value);
};
</script>

<style lang="scss" scoped>
.audit-config-item {
  height: 40px;
  background: #f5f7fa;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 10px;
  margin-bottom: 10px;
  span {
    color: #86909c;
    font-size: 12px;
  }
}
</style>
